// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.jasmin.common;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public interface Synchronizer {
  Controller[] getControllers();
  
  interface Factory {
    Synchronizer newSynchronizer(Callback[] callbacks);
  }
  
  interface Controller {
    void read();
    void write();
    void noWriteFor(long cycles);
    void waitFor(long cycles);
    void flush();
  }
  
  interface Callback {
    void written();
  }
}
